import requests
def getData():
    header={
        'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36'
    }
    data={
        'name':'Tom',
        'age':100
    }
    resp=requests.get('https://www.httpbin.org/get',params=data,headers=header)
    print(resp.text)
def uploadFile():
    header={
        'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36'
    }
    files={
        'file':open('C:\\Users\\1hui1hui\\Downloads\\xianmian.png','rb')
    }
    resp=requests.post('https://www.httpbin.org/post',files=files)
    print(resp.text)

if __name__ =='__main__':
    uploadFile()